package ObjectDemo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2023-04-06
 * Time: 9:01
 */
public class Main {
    public static void main(String[] args) {
        Student student1 = new Student("张三", 12);
        Student student2 = new Student("张三", 12);
        //toString
        System.out.println(student1);
        //重写equals前
        System.out.println(student1 == student2);
        System.out.println( student1.equals(student2));
    }
}
